#include <stdio.h>

void showrgb(int r, int g, int b)
{
    printf("\e[48;2;%d;%d;%dm \e[0m", r, g, b);
}

int main()
{
    int step = 16;
    for (int r = 0; r < 255; r += step)
        for (int g = 0; g < 255; g += step)
            for (int b = 0; b < 255; b += step)
                showrgb(r, g, b);
    printf("\n");
}
